package gameplaying;

import java.util.Scanner;
import java.util.HashSet;
import java.util.Set;

//翻硬币游戏
public class FlipCoin {

	//HDU 3537 满足约束条件6
	
	//2 * x的二进制表示中最后一位一定是0(乘以2相当于左移1位)，所以如果2 * x二进制中1的个数为偶数,2x + 1二进制个数为奇数
	//sg值是2 * x(如果二进制中1的个数为奇数)，为2 * x + 1(如果二进制中1的个数为偶数)
	public int getSG(int x){
		int res  = 2 * x;
		int temp = res;
		int count = 0;
		while(temp != 0){
			temp &= temp - 1;
			count++;
		}
		if( (count & 1) != 0){
			//如果为奇数
			return res;
		}else{
			return res + 1;
		}
	}
	
	//Runtime: 296MS
	public static void main(String[] args) {
		FlipCoin object = new FlipCoin();
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()){
			int count = scanner.nextInt();
			int sum = 0;
			Set<Integer> set = new HashSet<>();
			for (int i = 0; i < count; i++) {
				//根据题意，同一个硬币可能会输入多次
				int position = scanner.nextInt();
				if(set.add(position)){
					sum ^= object.getSG(position);
				}
			}
			if(sum == 0){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}
		scanner.close();
	}
}
